package com.mall.seckill.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

import javax.persistence.Column;
import javax.persistence.Table;
import java.io.Serializable;

/**
 * <p>
 * 秒杀商品表
 * </p>
 *
 * @author Darren
 * @since 2022-09-28
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("seckill_goods")
@Table
@ApiModel(value="SeckillGoods对象", description="秒杀商品表")
public class SeckillGoods implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private String id;

    /**
     * spu ID
     */
    @ApiModelProperty(value = "spu ID")
    @TableField("sup_id")
    @Column(name = "sup_id")
    private String supId;

    /**
     * sku ID
     */
    @ApiModelProperty(value = "sku ID")
    @TableField("sku_id")
    @Column(name = "sku_id")
    private String skuId;

    /**
     * 标题
     */
    @ApiModelProperty(value = "标题")
    @TableField("name")
    private String name;

    /**
     * 商品图片
     */
    @ApiModelProperty(value = "商品图片")
    @TableField("images")
    private String images;

    /**
     * 原价格
     */
    @ApiModelProperty(value = "原价格")
    @TableField("price")
    private Integer price;

    /**
     * 秒杀价格
     */
    @ApiModelProperty(value = "秒杀价格")
    @TableField("seckill_price")
    @Column(name = "seckill_price")
    private Double seckillPrice;

    /**
     * 秒杀商品数
     */
    @ApiModelProperty(value = "秒杀商品数")
    @TableField("num")
    private Integer num;

    /**
     * 剩余库存数
     */
    @ApiModelProperty(value = "剩余库存数")
    @TableField("store_count")
    @Column(name = "store_count")
    private Integer storeCount;

    /**
     * 描述
     */
    @ApiModelProperty(value = "描述")
    @TableField("content")
    private String content;

    /**
     * 活动ID
     */
    @ApiModelProperty(value = "活动ID")
    @TableField("activity_id")
    @Column(name = "activity_id")
    private String activityId;


}
